package com.cskaoyan.wordmemorize.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cskaoyan.wordmemorize.dao.entity.LevelDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LevelMapper extends BaseMapper<LevelDO> {

    @Select("SELECT l.*, lp.* FROM level l LEFT JOIN level_privilege lp ON l.id = lp.level_id")
    List<LevelDO> selectAllLevelsWithPrivileges();
}
